package com.sc.nft.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@NoArgsConstructor
@Data
public class ImAddGroupMemberDTO {

    @ApiModelProperty("操作的群 ID")
    private String groupId;

    @ApiModelProperty("是否静默加人。0：非静默加人；1：静默加人。不填该字段默认为0")
    private Integer silence;

    @ApiModelProperty("待添加的群成员 UserID")
    private List<Map> memberAccount;

    public void setMemberAccount(List<String> memberAccount) {
        List<Map>info=new ArrayList<>();
        memberAccount.forEach(s -> {
            Map map=new HashMap();
            map.put("Member_Account",s);
            info.add(map);
        });
        this.memberAccount = info;
    }

}
